<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改专利')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-patent-edit" th:object="${tycPatent}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">序号：</label>
                <div class="col-sm-8">
                    <input name="numbers" th:field="*{numbers}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">专利类型：</label>
                <div class="col-sm-8">
                    <select name="ptype" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">专利名称：</label>
                <div class="col-sm-8">
                    <input name="pname" th:field="*{pname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">公开号：</label>
                <div class="col-sm-8">
                    <input name="opens" th:field="*{opens}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">申请人：</label>
                <div class="col-sm-8">
                    <input name="sname" th:field="*{sname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">发明人：</label>
                <div class="col-sm-8">
                    <input name="fname" th:field="*{fname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">其他参与人员：</label>
                <div class="col-sm-8">
                    <input name="qname" th:field="*{qname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">申请日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="stime" th:value="${#dates.format(tycPatent.stime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">授权日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="qtime" th:value="${#dates.format(tycPatent.qtime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">赋分：</label>
                <div class="col-sm-8">
                    <input name="grade" th:field="*{grade}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">奖金：</label>
                <div class="col-sm-8">
                    <input name="bonus" th:field="*{bonus}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">上传人：</label>
                <div class="col-sm-8">
                    <input name="shname" th:field="*{shname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">文件：(doc/pdf)</label>
                <div class="col-sm-8">
                    <input type="hidden" name="accessory">
                    <div class="file-loading">
                        <input class="form-control file-upload" id="accessory" name="file" type="file">
                    </div>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">审批状态：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="radio-box">-->
<!--                        <input type="radio" name="status" value="">-->
<!--                        <label th:for="status" th:text="未知"></label>-->
<!--                    </div>-->
<!--                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">备案：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="onRecords" th:field="*{onRecords}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "ruoyi/patent";
        $("#form-patent-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-patent-edit').serialize());
            }
        }
        $(".file-upload").fileinput({
            uploadUrl: '/common/upload',
            maxFileCount: 1,
            autoReplace: true
        }).on('fileuploaded', function (event, data, previewId, index) {
            $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
        }).on('fileremoved', function (event, id, index) {
            $("input[name='" + event.currentTarget.id + "']").val('')
        });
        $("input[name='stime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='qtime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>